/****** Object:  View [dbo].[InformeStock]    Script Date: 11/16/2011 00:02:36 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[InformeStock]'))
DROP VIEW [dbo].[InformeStock]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK__productos__id_us__737017C0]') AND parent_object_id = OBJECT_ID(N'[dbo].[productos_auditoria]'))
ALTER TABLE [dbo].[productos_auditoria] DROP CONSTRAINT [FK__productos__id_us__737017C0]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FKF129EF4739322FC9_A]') AND parent_object_id = OBJECT_ID(N'[dbo].[productos_auditoria]'))
ALTER TABLE [dbo].[productos_auditoria] DROP CONSTRAINT [FKF129EF4739322FC9_A]
GO

USE [solinf]
GO

/****** Object:  Table [dbo].[productos_auditoria]    Script Date: 11/16/2011 01:41:50 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[productos_auditoria]') AND type in (N'U'))
DROP TABLE [dbo].[productos_auditoria]
GO


/****** Object:  Trigger [ProductosOnUpdate]    Script Date: 11/16/2011 01:46:22 ******/
IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[ProductosOnUpdate]'))
DROP TRIGGER [dbo].[ProductosOnUpdate]
GO


/****** Object:  Trigger [ProductosOnDelete]    Script Date: 11/16/2011 01:49:01 ******/
IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[ProductosOnDelete]'))
DROP TRIGGER [dbo].[ProductosOnDelete]
GO


/****** Object:  View [dbo].[RankingVendedores]    Script Date: 12/20/2011 00:10:30 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[RankingVendedores]'))
DROP VIEW [dbo].[RankingVendedores]
GO

/****** Object:  View [dbo].[RankingProductos]    Script Date: 12/20/2011 00:13:38 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[RankingProductos]'))
DROP VIEW [dbo].[RankingProductos]
GO


/****** Object:  View [dbo].[RankingClientes]    Script Date: 12/20/2011 00:35:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[RankingClientes]'))
DROP VIEW [dbo].[RankingClientes]
GO

/****** Object:  View [dbo].[ProductosStockMin]    Script Date: 12/20/2011 14:04:23 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[ProductosStockMin]'))
DROP VIEW [dbo].[ProductosStockMin]
GO


/****** Object:  Table [dbo].[presupuestos_auditoria]    Script Date: 12/20/2011 14:12:07 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[presupuestos_auditoria]') AND type in (N'U'))
DROP TABLE [dbo].[presupuestos_auditoria]
GO


/****** Object:  Trigger [PresupuestosOnDelete]    Script Date: 12/20/2011 14:11:48 ******/
IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[PresupuestosOnDelete]'))
DROP TRIGGER [dbo].[PresupuestosOnDelete]
GO

/****** Object:  Trigger [PresupuestosOnUpdate]    Script Date: 12/20/2011 14:12:40 ******/
IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[PresupuestosOnUpdate]'))
DROP TRIGGER [dbo].[PresupuestosOnUpdate]
GO

